using System.Web.UI.WebControls;
using Microsoft.SharePoint;

namespace zevenseas.Community.Web.UI.WebControls
{
    public class ListDropDown : DropDownList
    {
        private SPListCollection webLists;

        public ListDropDown()
        {
            webLists = SPContext.Current.Web.Lists;
            webLists.ListsForCurrentUser = true;
        }

        protected override void OnInit(System.EventArgs e)
        {
            DataSource = webLists;
            DataTextField = "Title";
            DataValueField = "ID";
            DataBind();

            base.OnInit(e);
        }
    }
}